@@ -0,0 +1,18 @@ |
||
1 |
+# -*- coding: utf-8 -*- |
|
2 |
+# Generated by Django 3.2.8 on 2022-10-27 09:15 |
|
3 |
+ |
|
4 |
+from django.db import migrations |
|
5 |
+ |
|
6 |
+ |
|
7 |
+class Migration(migrations.Migration): |
|
8 |
+ |
|
9 |
+ dependencies = [ |
|
10 |
+ ('member', '0045_auto_20221026_2102'), |
|
11 |
+ ] |
|
12 |
+ |
|
13 |
+ operations = [ |
|
14 |
+ migrations.AlterUniqueTogether( |
|
15 |
+ name='memberactivitycontributionwelfareunlockinginfo', |
|
16 |
+ unique_together={('activity_id', 'welfare_id', 'user_id')}, |
|
17 |
+ ), |
|
18 |
+ ] |
@@ -369,7 +369,7 @@ class MemberActivityInfo(BaseModelMixin, BrandInfoMixin): |
||
369 | 369 |
is_slider = models.BooleanField(_(u'is_slider'), default=True, help_text=u'是否为轮播活动') |
370 | 370 |
slider_image = models.ImageField(_(u'slider_image'), upload_to=upload_path, blank=True, help_text=u'活动轮播图片') |
371 | 371 |
cover = models.ImageField(_(u'cover'), upload_to=upload_path, blank=True, help_text=u'活动列表图片') |
372 |
- limit_image_num = models.IntegerField(_(u'limit_image_num'), default=3, help_text=u'限制图片数量') |
|
372 |
+ limit_image_num = models.IntegerField(_(u'limit_image_num'), default=0, help_text=u'限制图片数量') |
|
373 | 373 |
image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, help_text=u'活动内容图片') |
374 | 374 |
|
375 | 375 |
content_rich_text = RichTextField(_(u'content_rich_text'), blank=True, default='', help_text=u'活动描述') |
@@ -824,6 +824,10 @@ class MemberActivityContributionWelfareUnlockingInfo(BaseModelMixin, BrandInfoMi |
||
824 | 824 |
verbose_name = _(u'会员活动投稿福利解锁信息') |
825 | 825 |
verbose_name_plural = _(u'会员活动投稿福利解锁信息') |
826 | 826 |
|
827 |
+ unique_together = ( |
|
828 |
+ ('activity_id', 'welfare_id', 'user_id'), |
|
829 |
+ ) |
|
830 |
+ |
|
827 | 831 |
def __unicode__(self): |
828 | 832 |
return '%d' % self.pk |
829 | 833 |
|
@@ -848,4 +852,5 @@ class MemberActivityContributionWelfareUnlockingInfo(BaseModelMixin, BrandInfoMi |
||
848 | 852 |
'address': self.address, |
849 | 853 |
'tracking_number': self.tracking_number, |
850 | 854 |
'is_handled': self.is_handled, |
855 |
+ 'created_at': tc.local_string(utc_dt=self.created_at), |
|
851 | 856 |
} |